package com.huatai.saas.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 用户模型授权表
 * @TableName user_scene_auth
 */
@TableName(value ="user_scene_auth")
@Data
@ApiModel(value = "用户模型授权表", description = "用户模型授权表")
public class UserSceneAuthEntity implements Serializable {

	@TableField(exist = false)
	private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
	@ApiModelProperty(value = "主键")
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 用户id
     */
	@ApiModelProperty(value = "被授权用户id")
	@TableField("user_id")
    private Long userId;

    /**
     * 授权用户ID
     */
	@ApiModelProperty(value = "授权操作用户id")
	@TableField("auth_user_id")
    private Long authUserId;

    /**
     * 模型id
     */
	@ApiModelProperty(value = "模型id")
	@TableField("sf_id")
    private Long sfId;

    /**
     * 信息备注
     */
	@ApiModelProperty(value = "信息备注")
	@TableField("remark")
    private String remark;

    /**
     * 授权状态0正常1禁用
     */
	@ApiModelProperty(value = "授权状态0正常1禁用")
    private Integer status;

    /**
     * 授权开始时间
     */
	@ApiModelProperty(value = "授权开始时间")
	@TableField("auth_start_time")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private LocalDateTime authStartTime;

    /**
     * 授权结束时间
     */
	@ApiModelProperty(value = "授权结束时间")
	@TableField("auth_end_time")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private LocalDateTime authEndTime;

	@ApiModelProperty(value = "签名")
	@TableField("signature")
	private String signature;

	@ApiModelProperty(value = "场景内部唯一标识，")
	@TableField("open_id")
	private String openId;

    /**
     * 创建时间
     */
	@ApiModelProperty(value = "创建时间")
	@TableField(value = "create_time",fill = FieldFill.INSERT)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private LocalDateTime createTime;
}
